package com.ksyun.campus.metaserver.domain;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * Cluster configuration
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class ClusterConfig {
    
    private int replicationFactor;
    private long blockSizeBytes;
    private String version;
    private long createdTime;
    private long updatedTime;
    
    public static ClusterConfig defaultConfig() {
        return ClusterConfig.builder()
                .replicationFactor(3)
                .blockSizeBytes(524288L) // 512KB
                .version("1.0")
                .createdTime(System.currentTimeMillis())
                .updatedTime(System.currentTimeMillis())
                .build();
    }
}
